<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0, minimum-scale=1.0, user-scalable=0, initial-scale=1.0, width=device-width"/>
    <meta name="format-detection" content="telephone=no, email=no, date=no, address=no">
    <title>首页</title>
    <link rel="stylesheet" type="text/css" href="../../css/bootstrap.min.css" />
    <link rel="stylesheet" type="text/css" href="../../css/api.css" />
    <link rel="stylesheet" type="text/css" href="../../css/main.css" />

    <link rel="stylesheet" type="text/css" href="../../css/colleague.css" />

    <script type="text/javascript" src="../../script/api.js"></script>
    <script type="text/javascript" src="../../script/jquery.js"></script>

    <script type="text/javascript" src="../../script/main.js"></script>
</head>
<body>
  <div id="header">
      <div id="back"></div>
      <h3>申请成为版主</h3>
  </div>
  <div id="all" style="background:#fff">
    <div class="choose_job">
      <div class="feedback">
        <div class="choose_type"><span>选择版块</span><select><option value="0">php</option><option value="1">java</option><option value="2">javascript</option><option value="3">c语言</option><option value="4">云计算</option><option value="5">大数据-hadoop技术</option><option value="6">移动应用</option></select></div>
      </div>
    </div>
    <footer>
      <button class="myBtn" style="font-size:16px;">提交</button>
    </footer>
  </div>
</body>
<script>
  apiready=function(){

  }
  $(function(){
    back();

    //点击保存
    $("#all").on("click",".myBtn",function(){
      var aid=$api.getStorage('aid');
      var selectedIndex=$("select").val();
      var url='/api/moderator-applies/new?applyAid='+aid+'&moderatorType='+selectedIndex;
      var data={};
      var functionRet=function(ret){
          toast("申请成功请等待审核","middle");
      }
      var functionErr=function(err){
        if(err.statusCode==500){
          toast("请勿重复申请","middle");
        }
      }
      post(url,data,functionRet,functionErr);
    })
  })
</script>
</html>
